﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Infrastructure.ViewModel;
using Microsoft.Practices.Prism.Regions;
using UltimateNavigationFramework.UriNavigation;

namespace Ultimate.Shell.ViewModels
{
    public class UnauthorisedViewModel : ViewModelBase, INavigationAware, IPageTitle
    {
        #region Requested Uri Property
        private string _requestedUri;
        public String RequestedUri
        {
            get { return _requestedUri; }
            set
            {
                if (_requestedUri != value)
                {
                    _requestedUri = value;
                    this.NotifyPropertyChanged(() => this.RequestedUri);
                }
            }
        }
        #endregion

        #region INavigationAware Implementation
        public bool IsNavigationTarget(NavigationContext navigationContext)
        {
            return true;
        }

        public void OnNavigatedFrom(NavigationContext navigationContext)
        {


        }

        public void OnNavigatedTo(NavigationContext navigationContext)
        {
            this.RequestedUri = navigationContext.Uri.OriginalString;
        }
        #endregion

        #region IPageTitle Implementation
        public string PageTitle
        {
            get { return "Unauthorised Access"; }
        }
        #endregion
    }
}
